package cloud.lysky.game.gamesampe.entity;

import com.almasb.fxgl.entity.Entity;
import com.google.common.collect.Lists;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;

import java.util.List;

@Getter
@Setter
@Schema(description = "玩家")
public class Player extends Entity {

    @Schema(description = "名称")
    private String name;

    @Schema(description = "生命值")
    private int HP;

    @Schema(description = "法力值")
    private int MP;

    @Schema(description = "攻击力")
    private int ATK;

    @Schema(description = "防御力")
    private int defense;

    @Schema(description = "暴击率")
    private double criticalHitRate;

    @Schema(description = "暴击效果")
    private double criticalBonus;

    @Schema(description = "技能列表")
    private List<Skill> skills;

    public static Player mockPlayer(){
        Player player = new Player();
        player.setName("战士");
        player.setHP(5000);
        player.setMP(200);
        player.setATK(22);
        player.setDefense(10);
        player.setCriticalHitRate(0.10);
        player.setCriticalBonus(1.5);
        player.setSkills(Lists.newArrayList(Skill.basic(""), Skill.advance(), Skill.advance2()));
        return player;
    }
}
